<template>
    <div id="scroll-father">
      <div class="block">
        <el-carousel trigger="click" height="985px">
          <el-carousel-item  v-for="(s,i) of changjianyewu" :key="i">
            <div class="img-item">
<!--              <el-image-->
<!--                  style="height: 985px"-->
<!--                  :src="s.url">-->
<!--              </el-image>-->
              <img :src="s.url" alt="" height="985px">
            </div>
          </el-carousel-item>
        </el-carousel>
      </div>
    </div>
</template>

<script>

const fs = require('fs');
function readFilePushData() {
  let filePath = `C:\\config\\常见业务\\`
  let tempFileList = fs.readdirSync(filePath);
  let tempList = []
  for (let file of tempFileList) {
    let data = fs.readFileSync(`${filePath}${file}`)
    let arrayBufferView = new Uint8Array(data);
    let blob = new Blob([arrayBufferView], {type: "image/jpeg"});
    let urlCreator = window.URL || window.webkitURL;
    tempList.push({
      url: urlCreator.createObjectURL(blob)
    })
  }
  return tempList
}

let changjianyewu = readFilePushData()
export default {
  name: "changjianyewu.vue",
  data() {
    return {
      changjianyewu,
      type: '1',
      betterScroll: null
    }
  },
  mounted() {
  //  this.createBetterScroll()
  },
  destroyed() {
   // this.betterScroll.destroy()
  },
  methods: {
    changeScroll() {
      this.betterScroll.scrollTo(0, 0)
      this.betterScroll.refresh()
    },
    // createBetterScroll() {
    //   this.betterScroll = new BetterScroll("#scroll-father", {
    //     mouseWheel: true,
    //     scrollY: true,
    //     observeDOM: true,
    //     scrollbar: {
    //       fade: true,
    //     },
    //   });
    // },

  }
}
</script>

<style lang="scss" scoped>

.radio-wrap {
  position: absolute;
  right: 100px;
  top: 100px;
  transform: scale(1.5);

  .radio-item {
    margin-top: 4px;
  }
}

#scroll-father {
  width: 1920px;
  height: 985px;
  overflow: hidden;
  text-align: center;
}


  .img-item {
    min-height: 1414px;
    text-align: center;
    overflow: hidden;
}


</style>